<!DOCTYPE html PUBLIC 
	"-//W3C//DTD XHTML 1.1 Transitional//EN"
	"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<%@ page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@taglib prefix="decorator"
	uri="http://www.opensymphony.com/sitemesh/decorator"%>
<%@taglib prefix="page" uri="http://www.opensymphony.com/sitemesh/page"%>
<%@taglib prefix="s" uri="/struts-tags"%>

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title><decorator:title default="Struts Starter" /></title>
<link href="<s:url value='/styles/main.css'/>" rel="stylesheet"
	type="text/css" media="all" />
<link href="<s:url value='/struts/niftycorners/niftyCorners.css'/>"
	rel="stylesheet" type="text/css" />
<link href="<s:url value='/struts/niftycorners/niftyPrint.css'/>"
	rel="stylesheet" type="text/css" media="print" />
<script language="JavaScript" type="text/javascript"
	src="<s:url value='/struts/niftycorners/nifty.js'/>"></script>
<script language="JavaScript" type="text/javascript">
        window.onload = function(){
            if(!NiftyCheck()) {
                return;
            }
            // perform niftycorners rounding
            // eg.
            // Rounded("blockquote","tr bl","#ECF1F9","#CDFFAA","smooth border #88D84F");
        }
    </script>
<decorator:head />
</head>
<body id="page-home">
<div id="page">
<div id="header" class="clearfix"><s:text name="sobi.title" />
<hr />
</div>

<div id="content" class="clearfix">
<div id="main">
<h3><decorator:title /></h3>
<decorator:body />
<hr />
</div>

<div id="sub">
<h3>Sub Content</h3>
</div>


<div id="local">
<h3><s:text name="local.nav.bar" /></h3>
<ul>
	<s:url id="index_search" action="indexSearchResource" includeParams="none"/>
	<li><a href="${index_search}"><s:text
		name="main.search.resource" /></a></li>
	<s:if test="#session['user'] == null">
		<s:url id="index_login" action="indexLogin" />
		<li><a href="${index_login}"><s:text name="main.user.login" /></a></li>
	</s:if>
	<s:else>
		<s:if test="#session['user'].type.equals('ADMIN')">
			<s:url id="index_create" action="findUser" namespace="/user" includeParams="none"/>
			<li><a href="${index_create}"><s:text
				name="main.user.create" /></a></li>

			<s:url id="manage_place" action="indexPlace" namespace="/place" includeParams="none"/>
			<li><a href="${manage_place}"><s:text name="main.manage.place" /></a></li>
		</s:if>
		<s:elseif test="#session['user'].type.equals('LIBRARIAN')">
			
			<s:url id="index_loan" action="indexLoan" namespace="/loan" includeParams="none"/>
			<li><a href="${index_loan}"><s:text name="main.loan.index" /></a></li>			
			
			<s:url id="create_resource" action="chooseResource" namespace="/resource" includeParams="none"/>
			<li><a href="${create_resource}"><s:text name="main.resource.create" /></a></li>

			<s:url id="create_unit" action="create" namespace="/unit" includeParams="none"/>
			<li><a href="${create_unit}"><s:text name="main.unit.create" /></a></li>
			
			<s:url id="show_reservations" action="findReservation" namespace="/reservation" includeParams="none"/>
			<li><a href="${show_reservations}"><s:text name="main.reservation.show" /></a></li>
			
			<s:url id="configuration" action="configuration" namespace="/configuration" includeParams="none"/>
			<li><a href="${configuration}"><s:text name="main.configuration.show" /></a></li>
		</s:elseif>
		
		<s:url id="index_logout" action="logout" namespace="/user" includeParams="none"/>
		<li><a href="${index_logout}"><s:text name="main.user.logout" /></a></li>
	</s:else>
</ul>
</div>


<div id="nav">
<div class="wrapper">
<h3>
	<s:if test="#parameters['message'] != null">
		MESSAGE: <s:property value="#parameters.message" />
	</s:if>
</h3>
<ul class="clearfix">
	<!--
		<li><a href="#">Menu 1</a></li>
		<li><a href="#">Menu 2</a></li>
		<li><a href="#">Menu 3</a></li>
		<li><a href="#">Menu 4</a></li>
		<li><a href="#">Menu 5</a></li>
		<li class="last"><a href="#">Menu 6</a></li>
	 -->
</ul>
</div>
<hr />
</div>
</div>

<div id="footer" class="clearfix">Version 0.5</div>

</div>

<div id="extra1">&nbsp;</div>
<div id="extra2">&nbsp;</div>
</body>
</html>
